<!DOCTYPE html>
<html>
<head>
    <% include ../include/css_header.html %>
    <style>
    </style>
</head>
<body class="actlist_bg">
    <div class="container">
        <div class="top_bar">
            <a class="icon-arrow-left bar_left" href="/faction/<%=factionId %>"></a>
        </div>
        <div class="row" style="height: 20px"></div>
        <div class="row">
            <div class="col-xs-12">
                <div class="bg_white_panel" style="padding: 10px;min-height:500px">
                    <div style="color: #999999">最近动态：</div>
                    <ul id="loglist">
                    </ul>
                </div>
            </div>
        </div>
        <input type="hidden" id="pageNo" value="" />
        <% include ../include/copyright.html %>
    </div>
<% include ../include/js_footer.html %>
<script type="text/javascript">
    var factionId = '<%=factionId %>';
    var userId = '<%=user.id %>';
    $(function(){
        var pageN = $('#pageNo').val();
        $.getJSON('/faction/logs/'+factionId+'/'+pageN, function(res){
            if(res.error) return AlertBox.showTip('出错了...');
            var logs = res.logs, len = logs.length;
            var html = ''
            if(len > 0){
                for(var i=0; i< len; i++){
                    html += '<li>'+logs[i].content+' <span style="float: right;color: #999999">'+logs[i].time.substring(5, 10)+'</span></li><hr>'
                }
                $('#loglist').append(html);
            }
        })
    })
</script>
</body>
</html>